<template>
  <!--明细页面弹出框-->
  <el-dialog
    title="实时客户支付协议管理查询明细"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="true"
    @close="closeFn"
  >
    <el-form ref="detailsForm" :model="formData" disabled label-width="160px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="交易流水号：" prop="id">
            <el-input v-model="formData.id" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="报文标识号：" prop="pkgId">
            <el-input v-model="formData.pkgId" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="工作日期：" prop="workdate">
            <el-date-picker
              v-model="formData.workdate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="变更方式：" prop="chgType">
            <el-select style="width: 100%" v-model="formData.chgType" placeholder="">
              <el-option
                v-for="dict in dictMap.CHG_CODE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="协议类型：" prop="contractType">
            <el-select style="width: 100%" v-model="formData.contractType" placeholder="">
              <el-option
                v-for="dict in dictMap.ContractTypeCode"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="地域标识：" prop="regionid">
            <el-select style="width: 100%" v-model="formData.regionid" placeholder="">
              <el-option
                v-for="dict in dictMap.RegionId"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="授权模式：" prop="authModel">
            <el-select style="width: 100%" v-model="formData.authModel" placeholder="">
              <el-option
                v-for="dict in dictMap.AuthModelCode"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="统一社会信用代码：" prop="uniformScCode">
            <el-input v-model="formData.uniformScCode" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="合同（协议）号：" prop="protoId">
            <el-input v-model="formData.protoId" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="申请号：" prop="reqIdenty">
            <el-input v-model="formData.reqIdenty" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="客户号：" prop="custId">
            <el-input v-model="formData.custId" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="客户名称：" prop="custName">
            <el-input v-model="formData.custName" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="收款人名称：" prop="payeeName">
            <el-input v-model="formData.payeeName" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="缴费人名称：" prop="payerName">
            <el-input v-model="formData.payerName" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="缴费人账户类型：" prop="payerActnoType">
            <el-select style="width: 100%" v-model="formData.payerActnoType" placeholder="">
              <el-option
                v-for="dict in dictMap.ACT_TYPE"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="缴费人账号：" prop="payerActno">
            <el-input v-model="formData.payerActno" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="缴费人开户行行号：" prop="payerActnoBrno">
            <el-input v-model="formData.payerActnoBrno" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="缴费人证件类型：" prop="payerIdType">
            <el-select style="width: 100%" v-model="formData.payerIdType" placeholder="">
              <el-option
                v-for="dict in dictMap.Id_Type_Code"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="缴费人证件号码：" prop="payerIdNo">
            <el-input v-model="formData.payerIdNo" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="联系电话：" prop="payerTel">
            <el-input v-model="formData.payerTel" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="地址：" prop="payerAddr">
            <el-input v-model="formData.payerAddr" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="协议到期日期：" prop="contractDueDate">
            <el-date-picker
              v-model="formData.contractDueDate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="协议签署日期：" prop="contractSignDate">
            <el-date-picker
              v-model="formData.contractSignDate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="生效日期：" prop="effectDate">
            <el-date-picker
              v-model="formData.effectDate"
              type="date"
              value-format="yyyyMMdd"
              placeholder=""
              style="width: 100%"
            ></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="费项数目：" prop="paymentNum">
            <el-input v-model="formData.paymentNum" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="一次扣费限额币种：" prop="limitCurcd">
            <el-input v-model="formData.limitCurcd" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="一次扣费限额：" prop="limitAmt">
            <el-input v-model="formData.limitAmt" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="扣款周期内限制笔数：" prop="cycLimitNum">
            <el-input v-model="formData.cycLimitNum" />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="扣款周期内扣费限额币种：" prop="cycLimitCurcd">
            <el-input v-model="formData.cycLimitCurcd" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="扣款周期内扣费限额：" prop="cycLimitAmt">
            <el-input v-model="formData.cycLimitAmt" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="扣款时间单位：" prop="timeUnit">
            <el-select style="width: 100%" v-model="formData.timeUnit" placeholder="">
              <el-option
                v-for="dict in dictMap.TimeUnitCode"
                :key="dict.value"
                :label="`${dict.value}-${dict.text}`"
                :value="dict.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="扣款时间步长：" prop="timeStep">
            <el-input v-model="formData.timeStep" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="扣款时间描述：" prop="timeDesc">
            <el-input type="textarea" v-model="formData.timeDesc" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="附言：" prop="addInfo">
            <el-input type="textarea" v-model="formData.addInfo" />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="协议附加数据：" prop="contractAddInfo">
            <el-input type="textarea" v-model="formData.contractAddInfo" />
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <ht-table
      ref="dataTable"
      :showSerialNumber="false"
      :multi-select="false"
      :dictMap="dictMap"
      :initData="false"
      :reqConfig="reqConfig"
      :queryParams="queryParams"
      :tableBindColumns="tableBindColumns"
      style="height: 240px"
    ></ht-table>
    <div slot="footer" class="dialog-footer">
      <el-button @click="closeFn">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { detailsApiUrlConfig } from "@/api/cnaps/bepsDraft/client_pay_pact_manage_query.js";

export default {
  name: "ClientPayPactManageQueryDetails",
  components: {},
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
    id: {
      type: String,
      default: () => {
        return "";
      },
    },
  },
  data() {
    return {
      // 是否显示弹出层
      open: false,
      isLoading: false,
      reqConfig: detailsApiUrlConfig,
      queryParams: {
        id: "",
      },
      tableBindColumns: [
        {
          label: `费项代码`,
          prop: "paymentCode",
          width: "1000",
          align: "center",
        },
      ],
    };
  },
  mounted() {},
  watch: {
    open(d) {
      if (d) {
        this.$nextTick(() => {
          this.$set(this.queryParams, "id", this.id);
          this.$refs.dataTable.doQuery();
        });
      }
    },
  },
  methods: {
    //审核

    // 表单重置
    reset() {
      this.resetForm("detailsForm");
    },
    closeFn() {
      this.open = false;
      this.reset();
    },
    show() {
      this.open = true;
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
